


<div class="clearfix"></div>

<!-- Content -->

<div class="page_title2">
<div class="container">

    <div class="title"><h1>Blog</h1></div>
    
    <div class="pagenation">&nbsp;<a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'index', 'action' => 'index'), null, TRUE); ?>">Home</a> <i>/</i> Blog</div>
    
</div>
</div>
<!-- end page title --> 
<div class="clearfix"></div>

<div class="container">

	<div class="content_fullwidth">
    
    <div class="container">
      <div class="row">
        <div class="content_left">
		
		<?php 
				if(count($this->blogData) > 0):
				$i = 0;
					foreach($this->blogData as $key =>$value):
		?>
		  
          <div class="blog-widget">
            <div class="date-icon option1">
              <span><?php echo date('d-M ',strtotime($value['blog_createddate'])); ?></span>
            </div>

            <div class="blog-header">
             
               <h2><?php echo ucfirst($value['blog_title']); ?></h2>
               <div class="blog-meta">
                 <span><a href="#">By Admin</a></span>
                 <span><a href="#"><?php echo $value["cat_name"]; ?></a></span>
                 <span><a href="#"><?php echo $value['comment_count'] ?>  comments</a></span>
               </div>
            </div>
				<?php 
					if($value['blog_image'] != '' && file_exists($this->UPLOAD_PATH . "blog/" . $value['blog_image'])){
                        $src_path = $this->PUBLIC_PATH . "upload/blog/" . $value['blog_image'];
                       // $video_image = '<img width="330" height="170" src="'.$src_path.'" alt="" class="img-responsive"> ';
                    }else{
                        $src_path = $this->IMAGES_PATH."default_blog.jpg";
					}
				?> 
            <div class="blog-element">
			<img src="<?php echo $src_path; ?>" width="1100" height="480" alt="">
				       </div>

            <div class="blog-summary">
              <p><?php echo $this->gtlObj->getCollapseText($value['blog_shortdescription'],200); ?></p>
              <div class="div-spacer20"></div>
              
            </div>
            <a href="<?php echo $this->url(array("module" => "default", "controller" => "blog", "action" => "blogdetail" ,"blog_id" => $value["blog_id"]), null, TRUE); ?>" class="but_woman img_left3">Read more</a>
            <div class="tm"></div>
          </div>
			<?php 
                $i++;
                endforeach;
                else:
			?>
                <div class="col-lg-8 ">No blog found</div>
            <?php endif;?>
          
		  <div class="clearfix divider_dashed9"></div>
            
          <div class="pagination">
				<!-- Pagination Normal -->
                <?php
					if (count($this->blogData) > 0):
						echo $this->paginator->displayPages();
					endif;
				?>
				
			</div><!-- /# end pagination -->
			
			
        </div>

<!-- sidebar -->
        <div class="right_sidebar">

	<div class="site-search-area">
    
        <form method="post" id="site-searchform" action="">
        <div>
        <input class="input-text" name="searchtype" id="s" value="<?php echo $this->searchtype ?>" onFocus="if (this.value == 'Enter Search keywords...') {this.value = '';}" onBlur="if (this.value == '') {this.value = 'Enter Search keywords...';}" type="text" />
        <input id="searchsubmit" value="search" type="submit" />
        </div>
        </form>
        
	</div><!-- end site search -->
    
    <div class="clearfix divider_dashed9"></div>

	<div class="sidebar_widget">
    
    	<div class="sidebar_title"><h3><i>Categories</i></h3></div>
		<ul class="arrows_list1">		
     
			<?php 
				if(count($this->categoryalldata) > 0):
				$i = 0;
				foreach($this->categoryalldata as $key =>$value): 
			?>
			
				<li>
					<a href="<?php echo $this->url(array("module" => "default", "controller" => "blog", "action" => "index" ,"cat_id" => $value["cat_id"]), null, TRUE); ?>">
						<i class="fa fa-angle-right"></i><?php echo $value["cat_name"]; ?>
					</a>
				</li>
			
			<?php 
				$i++;
                endforeach; 
			?>
				
			<?php endif; ?>
				
		</ul>
        
	</div><!-- end section -->

	<div class="clearfix divider_dashed9"></div>
    
	<div class="sidebar_widget">
    
    	<div class="sidebar_title"><h3><i>Archives</i></h3></div>
        
		<ul class="arrows_list1">	
			
			<?php 
				if(count($this->monthdata) > 0):
				$i = 0;
				foreach($this->monthdata as $key =>$value): 
			?>
			
				<li>
					<a href="<?php echo $this->url(array("module" => "default", "controller" => "blog", "action" => "blogdetail" , "month" => $value["month"], "year" => $value["year"]),null, TRUE); ?>">
						<i class="fa fa-angle-right"></i><?php echo $value["archive"]; ?>
					</a>
				</li>
			
			<?php 
				$i++;
                endforeach; 
			?>
				
			<?php endif; ?>
			
		</ul>
        
	</div><!-- end section -->

</div>
      </div>
    </div>        
</div>

</div>
	
</div>
<!-- end content area -->
